#make a Date for NeuralNetworks
import csv
import numpy
my_matrix = numpy.loadtxt(open('H:/Datamining/German Credit Dataset/German.data-numeric.csv',"rb"),delimiter=",",skiprows=0)
trainData = numpy.loadtxt(open('H:/Datamining/German Credit Dataset/train.csv', "rb"), delimiter=",",skiprows=0)

#
# # print my_matrix
#
# data = []
# for p in my_matrix:
# 	targets = []
# 	targets.append(int(p[24]))
# 	inputs = []
# 	for i in p:
# 		inputs.append(int(i))
# 	inputs.pop()
# 	data.append([inputs]+[targets])
#
# print data

trainDataofMatrix = []
for p in trainData:
	trainTargets = []
	trainTargets.append(int(p[24]))
	trainInputs = []
	for line1 in p:
		trainInputs.append(int(line1))
	trainInputs.pop()
	trainDataofMatrix.append([trainInputs] + [trainTargets])
print trainDataofMatrix

# take = 0
# for i in data:
# 	# take += 1
# 	# if take <= 1 :
# 		print i[0]
# 		print i[1]


# pat = [
# 		[[0, 0], [0]],
# 		[[0, 1], [1]],
# 		[[1, 0], [1]],
# 		[[1, 1], [0]]
# 	]
# print pat

